<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>欢迎页面-X-admin2.0</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>
    <link rel="stylesheet" href="./css/font.css">
    <link rel="stylesheet" href="./css/xadmin.css">
    <script type="text/javascript" src="./js/jquery.min.js"></script>
    <script src="./js/common.js"></script>
    <script type="text/javascript" src="./lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="./js/xadmin.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="./js/html5.min.js"></script>
    <script src="./js/respond.min.js"></script>
    <![endif]-->

    <script>
        var baseUrl = parent.baseUrl;
        var env = $.getUrlParam("env");
        var gateway = $.getUrlParam("gateway");


        $(function () {
            var hystrixUrl = baseUrl + 'hystrix/monitor?stream=' + encodeURIComponent(baseUrl + 'turbine.stream?cluster=' + gateway + '_' + env);
            $("#hystrix-iframe").attr("src", hystrixUrl);
        });
    </script>
</head>

<body class="layui-anim layui-anim-up">
<div class="x-nav">
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"
       href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i></a>
</div>
<div class="x-body">
    <xblock>
        <button class="layui-btn" onclick="openHystrixEdit()"><i
                class="layui-icon"></i>编辑
        </button>
    </xblock>
    <div style="height: 600px;width: 100%;">
        <iframe id="hystrix-iframe" src="" style="width: 100%;height: 100%;border: 0;"></iframe>
    </div>


</div>

<script>
    function openHystrixEdit() {
        x_admin_show('编辑监控地址', './gateway-hystrix-edit.html?gateway=' + gateway + "&env=" + env, 900, 400);
    }
</script>

<script>var _hmt = _hmt || [];
(function () {
    var hm = document.createElement("script");
    hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(hm, s);
})();</script>
</body>


<script>

    layui.use(['laytpl', 'layer'], function () {
        var laytpl = layui.laytpl;
        var layer = layui.layer;

    });
</script>

</html>